package com.sfy.login.service.impl;


import com.sfy.login.common.LoginTypeEnum;
import com.sfy.login.common.RedisKey;
import com.sfy.login.entity.User;
import com.sfy.login.third.JedisUtil;
import org.springframework.stereotype.Service;

@Service
public class SmsLoginService extends AbstarctLoginService {
    @Override
    public String getLoginType() {
        return LoginTypeEnum.SMS_LOGIN.getLoginCode();
    }

    @Override
    public String getCode(User user) {
        String key = RedisKey.SMS_KEY + user.getPhone();
        return JedisUtil.getStr(key);
    }

    @Override
    public void removeLoginCache(User user) {

    }
}
